Draft Plan: Meta Pixereum and Meta Pixereum Fund
A draft plan for registering a whole picture of the latest Pixereum and an experimental fund for the pixereum owners.
NOTE
This is an experimental project. Use at your own risk. We will not be responsible for any losses.
All contracts have not been audited.
This is a just draft plan. We have not decided to launch them yet.
DESCRIPTION
We are planning to register "Meta Pixereum" on the OpenSea.
"Meta Pixereum" is a whole picture of the latest Pixereum.
The metadata for the OpenSea will be updated every 10 min.
To update a picture in the OpenSea, you may need to "force update" the metadata.
We are planning to set a contract address of "Meta Pixereum Fund" as a payout address of the "Meta Pixereum".
We are planning to set 2.5% as the secondary market fee in the OpenSea.
We DO NOT guarantee the contract address will be set forever in the OpenSea.
It can be removed because of regulations, etc.
We do not plan to launch UI for the "Meta Pixereum Fund". Etherescan can be used to interact with the contract.
How "Meta Pixereum Fund" works
Current owners of "Wrapped Pixereum" can claim ETH in each "epoch".
1 epoch == 210,000 block (about 1 month)
An amount of claimable ETH is calculated as below and determined when the first tx is made in an epoch.
currentEpochRewards = ethAmountInTheContract / 10000
Consideration
It can take some time to accumulate enough ETH in the "Meta Pixereum Fund" contract due to dividing by 10000 pixels.
So it may reward long term Pixereum owners ;)
Smart Contract
code:MetaPixereumFund.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
interface IWrappedPixereum {
function ownerOf(uint256 tokenId) external view returns (address);
}
contract MetaPixereumFund {
// Wrapped Pixereum
address public constant wrappedPixereumContractAddress = 0x6f9d53BA6c16fcBE66695E860e72a92581b58Aed;
IWrappedPixereum private wrappedPixereum;
// block number when this contract is created
uint256 public startBlock;
// 210000 - about 1 month
uint256 public constant epochInterval = 210000;
// map for storing info if already claimed for a pixelNumber
// pixelNumber => claimedEpoch
mapping(uint16 => uint256) public claimedPixels;
// store the last claimed epoch
uint256 public lastClaimEpoch;
// store a current epoch rewards
// it's determined in the first tx in a epoch
uint256 public currentEpochRewards;
// max supply of pixels
uint16 maxSupply = 10000;
event Claim(address indexed from, uint256 indexed epoch);
constructor () {
startBlock = block.number;
wrappedPixereum = IWrappedPixereum(wrappedPixereumContractAddress);
}
receive() external payable {}
function getCurrentEpoch() public view returns (uint256) {
return (block.number - startBlock) / epochInterval;
}
function isClaimable(uint16 pixelNumber) public view returns (bool) {
uint256 currentEpoch = getCurrentEpoch();
}
function claim(uint16 pixelNumber) external {
// check if ETH in this contract is more than 10000 wei
require(address(this).balance >= maxSupply, "Not Enough Balance Of Contract");
// check an ownership of pixelNumber
require(wrappedPixereum.ownerOf(pixelNumber) == msg.sender, "Only WrappedPixel Owner");
// check if already claimed
require(isClaimable(pixelNumber), "Already Claimed In This Epoch");
// check if it's the first tx in a current epoch
uint256 currentEpoch = getCurrentEpoch();
if (currentEpoch > lastClaimEpoch) {
// update lastClaimEpoch
lastClaimEpoch = currentEpoch;
// calculate claimable amount.
currentEpochRewards = address(this).balance / maxSupply;
}
// update claimedPixels
(bool success, ) = msg.sender.call{value: currentEpochRewards}("");
require(success, "Transfer Failed");
emit Claim(msg.sender, currentEpoch);
}
}